//
//  BaseModel.m
//  ProjectXW
//
//  Created by LangLang on 17/5/25.
//  Copyright © 2017年 chirui. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
+ (NSMutableArray *)parsingDateFromResultDict:(NSDictionary *)dict andData:(NSString *)string{
    NSMutableArray *dataArray = [NSMutableArray array];
    if ([dict isKindOfClass:[NSDictionary class]]) {
        NSArray *appArray;
        
        if (string.length == 0) {
            appArray = dict[@"datas"];
        }else{
            appArray = dict[@"datas"][string];
        }
        
        for (NSDictionary *dic in appArray) {
                BaseModel *model = [[BaseModel alloc] init];
                [model setValuesForKeysWithDictionary:dic];
                [dataArray addObject:model];
        }
        
    }
    return dataArray;
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}

@end
